package com.songlanyun.modules.gainsdonation.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.math.BigDecimal;
import java.io.Serializable;
import java.util.Date;

import com.songlanyun.common.drive.RootEntity;
import com.songlanyun.common.enums.GoodsConstant;
import com.songlanyun.modules.gains.entity.ShopOrderGains;
import lombok.Data;

/**
 * 商家所得捐款
 *
 * @author lubo
 * @email sunlightcs@gmail.com
 * @date 2022-08-17 09:51:20
 */
@Data
@TableName("yxt_shop_order_gains_donation")
public class ShopOrderGainsDonationEntity extends RootEntity<Long, ShopOrderGainsDonationEntity> implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 *
	 */
	@TableId
	private Long id;
	/**
	 * 店铺id
	 */
	private Long shopId;

	/**
	 * 订单id
	 */
	private Long orderId;
	/**
	 * 订单编号
	 */
	private String orderCode;
	/**
	 * 子订单编号
	 */
	private Long childOrderId;
	/**
	 * 子订单实际金额
	 */
	private BigDecimal childOrderFaceValue;
	/**
	 * 捐款金额
	 */
	private BigDecimal donationValue;
	/**
	 *
	 */
	@TableField(fill = FieldFill.INSERT)
	private Date createTime;

	/**
	 * 商品分区特征(0,普通商品,1服务体系礼包,2新人福利区,3公益申领)
	 */
	private GoodsConstant.AreaFeature areaFeature;

	/**
	 * 商家所得id
	 */
	private Long shopOrderGainsId;

	/**
	 * 是否存在退款
	 */
	private Boolean existsRefund;

	/**
	 * 退款扣除
	 */
	private BigDecimal refundDeduct;

	/**
	 * 实际捐款（是扣出退款）
	 */
	private BigDecimal ableGains;

	@Override
	public Long getIdentity() {
		return getId();
	}
}
